package org.example.test915.schedule;

import org.example.test915.entity.bo.PageUserInfoParam;
import org.example.test915.service.UserInfoService;
import org.springframework.stereotype.Component;
import tech.powerjob.worker.core.processor.ProcessResult;
import tech.powerjob.worker.core.processor.TaskContext;
import tech.powerjob.worker.core.processor.sdk.BasicProcessor;
import tech.powerjob.worker.log.OmsLogger;
import javax.annotation.Resource;

@Component
public class TestPowerjobProcess implements BasicProcessor {

    @Resource
    private UserInfoService userInfoService;
    @Override
    public ProcessResult process(TaskContext taskContext) throws Exception {
        OmsLogger omsLogger = taskContext.getOmsLogger();
        PageUserInfoParam param = new PageUserInfoParam();
        userInfoService.page(param);
        omsLogger.info("查询操作");
        return new ProcessResult(true, "调用接口成功");
    }
}
